package com.config;

import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

public class ServletConfig extends AbstractAnnotationConfigDispatcherServletInitializer {
    @Override
    protected Class<?>[] getRootConfigClasses() {//根配置
        return new Class[]{SpringConfig.class};
    }

    @Override
    protected Class<?>[] getServletConfigClasses() {//web容器配置
        return new Class[]{SpringMvcConfig.class};
    }

    @Override
    protected String[] getServletMappings() {//路径管理
        return new String[]{"/"};
    }
}
